package com.huawei;
import java.math.BigDecimal;
import java.util.*;
/**
 * Created by Z-hong on 2024/7/17.
 */

/**
 * 描述
 * 假设一个球从任意高度自由落下，每次落地后反跳回原高度的一半; 再落下, 求它在第5次落地时，共经历多少米?第5次反弹多高？
 */

public class HJ38 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int height = sc.nextInt();
        BigDecimal bigDecimal = new BigDecimal(height);
        BigDecimal divisor = new BigDecimal(32);
        BigDecimal res_2 = bigDecimal.divide(divisor);

        BigDecimal bd = new BigDecimal(2);
        BigDecimal res_1 = new BigDecimal(height);
        for (int i = 0; i < 4; i++) {
            res_1 = res_1.add(bigDecimal.divide(bd).multiply(new BigDecimal(2)));
            bd = bd.multiply(new BigDecimal(2));
        }
        System.out.println(res_1);

        System.out.println(res_2);

    }
}
